#!/usr/bin/python
# -*- coding: UTF-8 -*-

import difflib


def getTextDiff(text1,text2):
    text1lines = text1.splitlines()
    text2lines = text2.splitlines()

    #只返回有变更的行
    result = difflib.unified_diff(text1lines, text2lines)
    result = "\n".join(result)
    return result
